<%@ page language="java" import="com.alibaba.fastjson.JSONArray" pageEncoding="UTF-8" %>
<%@ page import="com.alibaba.fastjson.JSONObject" %>
<%@ page import="weaver.general.Util" %>
<%@ page import="weaver.jobs.zhlx.duss.utils.ZhlxJobUtil" %>
<%--流程退回调用QMS接口--%>
<%
    try {
        ZhlxJobUtil jobUtil = new ZhlxJobUtil();
        JSONObject dataJson = new JSONObject();
        dataJson.put("VBELN", "");
        JSONObject resultJson = jobUtil.handleOKHttpRequest("FI006", dataJson);
        String code = Util.null2String(resultJson.getString("code"));
        out.print(">>>>>WeaSynXsddtzBySapCron>>>>>code=" + code+"<br/>");
        if ("success".equals(code)) {
            JSONObject outputJson = resultJson.getJSONObject("OUTPUT");
            String msgType = outputJson.getString("MSG_TYPE");
            String msgText = outputJson.getString("MSG_TEXT");
            out.print(">>>>>WeaSynXsddtzBySapCron>>>>>msgType=" + msgType + ",msgText=" + msgText+"<br/>");
            if ("S".equals(msgType) && "调用成功".equals(msgText)) {
                JSONObject dataReturnJson = outputJson.getJSONObject("DATA");
                JSONArray returnList = dataReturnJson.getJSONArray("DATAITEM");
                for (int i = 0; i < returnList.size(); i++) {
                    JSONObject returnJson = returnList.getJSONObject(i);
                    String xsddbh = returnJson.getString("VBELN");
                    out.print(">>>>>WeaSynXsddtzBySapCron>>>>>xsddbh=" + xsddbh+"<br/>");
                }
            }
        }
    } catch (Exception e) {
        out.print(">>>>>WeaSynXsddtzBySapCron>>>>>Exception=" + e);
    }

%>



